package com.example.shorg.exception;

import com.example.shorg.enums.ResultEnum;

/**
 * 异常统一处理
 * @author hmh
 * */
public class ShorgException extends RuntimeException{

    private Integer code;

    public ShorgException(ResultEnum resultEnum){
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public ShorgException(Integer code, String msg) {
        super(msg);
        this.code = code;
    }
}
